home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / elemmenu.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-10  |  1.4 KB  |  52 lines

  1. #include "elemmenu.h"
  2. #include "element.h"
  3.  
  4. void ElementMenu::calcItemsNumber()
  5.     {
  6.     for(count = 0; itemList[count] != 0; count++)
  7.     ;
  8.     }
  9. /////////////////////////
  10. void ElementMenu::showItem()
  11.     {
  12.     rect where = getItemCoord();
  13.     Element element(rect(where.origin,
  14.                          where.origin + screenLocLT(itemSize)),
  15.           itemList[pos - 1],
  16.           BUTTON_BORDER, element_pattern, 1);
  17.     element.show();
  18.     }
  19. //////////////////////////////
  20. /*
  21. void main()
  22.     {
  23.     if(!init_KNOW_HOW())
  24.         return;
  25.     setfillstyle(SOLID_FILL, pColorSet->colors.BAK_COLOR);
  26.     bar(0, 0, getmaxx(), getmaxy());
  27.  
  28.     int LIST[] = { LEFT_ELEMENT, RIGHT_ELEMENT, RED_ELEMENT,
  29.                    YELLOW_ELEMENT, WHITE_ELEMENT, 0 };
  30.  
  31.     ElementMenu e(rect(10, 10, 40, 15), "window.cpy", "ELEMENT MENU",
  32.            "12345", 1, 1, loc(2, 1), LIST, loc(3, 3),
  33.            rect(60, 20, 79, 25), MEDIUM_ICON, NULL, LIST,
  34.            FIXED, 10, SHOW_BORDER, SHOW_BORDER, 27, 28, 29);
  35.  
  36.     e.show();
  37.     e.exe();
  38.     e.hide();
  39.  
  40.     ElementMenu e1(rect(10, 10, 40, 12), "window.cpy", "",
  41.            "12345", 1, 1, loc(2, 1), LIST, loc(1, 0),
  42.            rect(60, 20, 79, 25), MEDIUM_ICON, NULL, LIST,
  43.            FIXED, 10, BUTTON_BORDER, NO_BORDER, 30, 31, 32);
  44.  
  45.     e1.show_window();
  46.     e1.exe();
  47.     e1.hide();
  48.  
  49.     close_KNOW_HOW();
  50.     closegraph();
  51.     }
  52. */